package com.xqboss.apps.dto.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author Trent
 * @date 2023/8/24
 */
@Data
@ApiModel
public class CreateMarketOrderDto {

    @ApiModelProperty("防重令牌")
    private String token;

    @ApiModelProperty(value = "市场ID", required = true)
    @NotNull(message = "参数异常！")
    private Long marketId;

    @ApiModelProperty(value = "订单数量", required = true)
    @Min(value = 1, message = "订单数量异常！")
    private Integer quantity;

    @ApiModelProperty("订单金额")
    @DecimalMin(value = "0", message = "订单金额错误")
    private BigDecimal price;

    @ApiModelProperty("赠送用户id")
    private Long giftUserId;
}
